package com.hjqjl.mvvmdemo.net;


import com.hjqjl.mvvmdemo.model.User;

import io.reactivex.Observable;

public class HttpMethods {
    private final ApiService apiService;

    private HttpMethods() {
        apiService = HttpManager.getInstance().create(ApiService.class);
    }

    public static HttpMethods getInstance() {
        return HttpMethodsHolder.S_INSTANCE;
    }

    private static class HttpMethodsHolder {
        private static final HttpMethods S_INSTANCE = new HttpMethods();
    }


    public Observable<User> getUser(String userId) {
        return apiService.getUser(userId);
    }

}
